/*
 * OpenSSLAESEncrypter.h
 *
 *  Created on: Jun 18, 2010
 *      Author: Lukasz Spintzyk
 */

#ifndef OPENSSLAESENCRYPTER_H_
#define OPENSSLAESENCRYPTER_H_

#include "Encrypter.h"
#include <vector>

class OpenSSLAESEncrypter: public AESEncrypter
{
public:
	OpenSSLAESEncrypter(BigInteger& init_vector, byte* key);
	virtual ~OpenSSLAESEncrypter();

	virtual void* encrypt(const void* inbuffer, uint32_t size, uint32_t nr);
	virtual void* decrypt(const void* buffer, uint32_t size, uint32_t nr);
private:
	void xorValues(const uint32_t* in, uint32_t* out, uint32_t* xor2, uint32_t size);
	void* d_outBuffer;
	uint32_t d_outBufferSize;
};

#endif /* OPENSSLAESENCRYPTER_H_ */
